#include<iostream>
#include<vector>
#include<unordered_map>
#include<algorithm>
#include<stack>
#include<cmath>
#include<string>
#include<unordered_set>
#include<map>
using namespace std;

void solve()
{
    long long k; cin >> k;
    cout << k + int(sqrtf(k) + 0.5) << endl;
}

int main()
{
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    int t; cin >> t;
    while (t--)
    {
        solve();
    }
    return 0;
}